package cn.cloudbae.schedule;

import java.text.SimpleDateFormat;
import java.util.Date;

import com.dangdang.ddframe.job.api.ShardingContext;
import com.dangdang.ddframe.job.api.simple.SimpleJob;

import cn.cloudbae.kit.PortKit;

public class SecondSimpleJob implements SimpleJob{
    
	@Override
	public void execute(ShardingContext content) {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
		String now = sdf.format(new Date());
        String port = String.valueOf(PortKit.getPort()); //获得运行时端口
		
        System.out.println(now + " at　" +port + ", " + content.toString());
	}
}
